home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 2000 July / macformat-092.iso / Dreamweaver 3 / Configuration / Shared / MM / Scripts / Class / PageControlClass.js < prev    next >
Encoding:
Text File  |  1999-12-01  |  1.7 KB  |  59 lines

  1. // Copyright 1999 Macromedia, Inc. All rights reserved.
  2.  
  3. //PageControl Class
  4.  
  5. //This is an example of a page class to be used with the TabControl.
  6. //Uncomment the alert() calls to display the various events as they occur.
  7.  
  8. function PageControl(theTabLabel) {
  9.   this.tabLabel = theTabLabel;
  10. }
  11.  
  12. PageControl.prototype.getTabLabel = PageControl_getTabLabel;
  13. PageControl.prototype.canLoad = PageControl_canLoad;
  14. PageControl.prototype.load = PageControl_load;
  15. PageControl.prototype.update = PageControl_update;
  16. PageControl.prototype.unload = PageControl_unload;
  17. PageControl.prototype.lastUnload = PageControl_lastUnload;
  18.  
  19. function PageControl_getTabLabel() {
  20.   return this.tabLabel;
  21. }
  22.  
  23. //Called to check if a page can be loaded
  24. //
  25. function PageControl_canLoad() {
  26.   //alert("canLoad() called " + this.tabLabel);
  27.   return true;
  28. }
  29.  
  30. //Called when the layer for this page is displayed.
  31. // Use this call to initialize controls.
  32. //
  33. function PageControl_load() {
  34.   //alert("load() called " + this.tabLabel + " (loaded = " + this.loaded + ")");
  35. }
  36.  
  37. //Called when one of the page controls calls the tabControl update function.
  38. // Use this call to respond to user input.
  39. //
  40. function PageControl_update(theItemName) {
  41.   alert("update() called for " + theItemName + " on " + this.tabLabel);
  42. }
  43.  
  44. //Called when another page is about to be shown, or finish() is called on
  45. // the tabControl.  Use this call to perform any finishing tasks.
  46. //
  47. function PageControl_unload() {
  48.   //alert("unload() called " + this.tabLabel);
  49.   return true;
  50. }
  51.  
  52. //Called when finish() is called on the tabControl.
  53. // Use this call to perform any last minute page updates.
  54. //
  55. function PageControl_lastUnload() {
  56.   //alert("lastUnload() called " + this.tabLabel);
  57.   return true;
  58. }
  59.